import pandas as pd
import sqlite3
import tkinter
from tkinter import ttk
data = pd.read_csv('ToolType.csv',sep=',')

root = tkinter.Tk()
root.title('SQLITR control')
root.geometry('1000x600')

form = ttk.Treeview(root)  #创建表格对象
form['columns'] = ('ID','姓名','年龄')  #建立3列
form.column('ID', width=100, anchor='center')  #ID这一列center中对其
form.column('姓名', width=100, anchor='center')
form.column('年龄', width=100, anchor='center')
form.heading("ID",text='ID')  #ID列名为 ID
form.heading("姓名",text='姓名')
form.heading("年龄",text='年龄')
form.insert("",0,text='1',values=("1","djy","18"))  #第0行插入 标题1 数值是values
form.insert("",0,text='1',values=("1","djy","18"))
form.insert("",0,text='1',values=("1","djy","18"))
form.insert("",0,text='1',values=("1","djy","18"))
 # tuple(data.iloc[3]) 打印第三行


form.pack()
root.mainloop()